package demo1;

public class demo7 {
    public static void main(String[] args) {
        String str = "520";
        Thread t1 = new Thread(()->{
            synchronized (str) {
                while (true) {
                }
            }
        });
        t1.start();
        Thread t2 = new Thread(()->{
            synchronized (str) {
                System.out.println("1");
            }
        });
        t2.start();
        System.out.println(t2.getState());
    }
}
